#ifndef 	__QUEUE_H__
#define 	__QUEUE_H__

typedef unsigned char  _data;
typedef unsigned short  Q_u16;

#ifndef uint8
typedef unsigned char uint8;
#endif

#ifndef uint16
typedef unsigned short uint16;
#endif

#define BUFF_SIZE 	1024u	//队列缓冲区大小

typedef struct {

	_data data[BUFF_SIZE];
	Q_u16 front;
	Q_u16 rear;

}Queue_t,*pQueue_t;  

extern Queue_t OutUartFifo;
extern Queue_t InUartFifo;

int queue_init(pQueue_t Q);
uint16 FifoGetused(pQueue_t q);
uint8 FifoWriteBytes(pQueue_t q, uint8 *buff, uint16 len);
uint16 FifoReadBytes(pQueue_t q, uint8 *buff, uint16 len);

#endif
